package cn.touna.jss.modules.custom.carmodel.mapper;

import cn.touna.jss.modules.custom.carmodel.dto.Car300ModelDto;
import cn.touna.jss.modules.custom.carmodel.entity.Car300ModelEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface Car300ModelEntityMapper {

    int insert(Car300ModelEntity record);

    int updateByModelId(Car300ModelEntity record);

    List<Car300ModelEntity> selectByPage(
            @Param("seriesId") int seriesId,
            @Param("pageSize") int pageSize,
            @Param("offset") int offset);

    List<Car300ModelEntity> selectAll(@Param("seriesId") int seriesId);

    int selectCount(@Param("seriesId") int seriesId);

    List<Car300ModelDto> selectByPageForMatch(
            @Param("brandId") int brandId,
            @Param("seriesId") int seriesId,
            @Param("match") Boolean match,
            @Param("pageSize") int pageSize,
            @Param("offset") int offset
    );

    int selectCountForMatch(
            @Param("brandId") int brandId,
            @Param("seriesId") int seriesId,
            @Param("match") Boolean match
    );

    Car300ModelEntity selectByModelId(int modelId);

    List<Car300ModelEntity> selectByModelIdSet(@Param("modelIdSet") Set<Integer> modelIdSet);
}